<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="lib/axios.min.js"></script>
<script>
    axios.defaults.baseURL='http://localhost:3000'
    // axios.get('adata').then(function (ret) {
    //     console.log(ret.data)
    // })

    // async function queryDate() {
    //     var ret=await axios.get('adata')
    //     console.log(ret)
    //     console.log(ret.data)
    //     return  ret.data
    // }
    async function queryDate() {
        var ret=await new Promise(function (resolve, reject) {
            setTimeout(function () {
                resolve('nihao')
            },1000)
        })
        return  ret
    }
    queryDate().then(function (data) {
        console.log(data)
    })
</script>
</body>
</html>